#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MAXN = 2e5 + 10;
const int MOD = 1e9 + 7;
int t, n, k;
int a[MAXN];

int f[MAXN];
int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);

    cin >> t;
    while (t--) {
        cin >> n >> k;
        map<int, int> mp, f;
        for (int i = 1; i <= n; i++) cin >> a[i], mp[a[i]]++;

        sort(a+1, a+1+n);
        int l = 0, r = 0;
        for (int i = 1; i <= n; i++) {
            if (mp[a[i]] >= k)
                f[a[i]] = f[a[i]-1] + 1;
        }

        int ans = -1;
        for (auto [k, v] : f) {
            if (v > ans) {
                l = k-v+1;
                r = k;
                ans = v;
            }
        }

        if (ans == -1) {
            cout << -1 << endl;
            continue;
        }
        cout << l << ' ' << r << endl;

    }
    return 0;
}